package com.kepler.social.usersecurity.dao.mapper;

import com.kepler.mybatis.base.MyBatisBaseMapper;
import com.kepler.social.usersecurity.dao.domain.UserEmail;
import com.kepler.social.usersecurity.dao.domain.UserEmailExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserEmailMapper extends MyBatisBaseMapper<UserEmail, String, UserEmailExample> {


    String Base_Column_List = "email, user_id, `state`, disuse_time, created_time, modified_time";

    @Select(" select " + Base_Column_List +
            " from u_email " +
            " where     email = #{email} and `state` = #{state}" +
            " limit 1")
    UserEmail selectByState(@Param("email") String email, @Param("state") int state);

}